// Word 粘贴优化插件

CKEDITOR.plugins.add('pastefromword', {
    requires: 'clipboard',
    init: function(editor) {
        // 配置 PasteFromWord 插件
        editor.config.pasteFromWordCleanupFile = false;
        editor.config.pasteFromWordRemoveFontStyles = false;
        editor.config.pasteFromWordRemoveStyles = false;
        
        // 添加按钮
        editor.ui.addButton('PasteFromWord', {
            label: '从 Word 粘贴',
            command: 'paste',
            toolbar: 'clipboard',
            icon: this.path + 'icons/pastefromword.png',  // 需要添加图标
            onClick: function() {
                // 触发粘贴命令
                editor.execCommand('paste');
            }
        });
    }
});